using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Admin_DanhSachBaiBao_GV : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {// loi giua csdl va va code 
        if (!IsPostBack)
        {
            //Ho_Ten.Text = Session["UserName"].ToString();

            GiaoVienBUS gv_bus = new GiaoVienBUS();
            ArrayList arr_gvien = gv_bus.LayMang_GiaoVien();
            DropDownList1.DataSource = arr_gvien;
            for (int i = 0; i < arr_gvien.Count; i++)
            {
                GiaoVienDTO gvdto = new GiaoVienDTO();
                gvdto = (GiaoVienDTO)arr_gvien[i];
                DropDownList1.Items.Add(new ListItem(gvdto.TenGiaoVien, gvdto.MaGiaoVien));

            }
        }
    }
    public void GetData()
    {
        BaiBaoBUS baobus = new BaiBaoBUS();
        int magv = int.Parse(DropDownList1.SelectedValue);
        ArrayList arr_bb = baobus.LayMang_BaiBao_GiaoVien(magv);

        GridView1.DataSource = arr_bb;
        GridView1.DataBind();

    }
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
      
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        GetData();
    }
}
